home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 34
/
Aminet 34 (2000)(Schatztruhe)[!][Dec 1999].iso
/
Aminet
/
misc
/
emu
/
Electrostatic.lha
/
Electrostatic
/
hidden
/
Translate Game
< prev
next >
Wrap
Text File
|
1999-10-17
|
2KB
|
126 lines
; File: Install Atari 2600 Game
; Author: Neil Cafferkey
; =============================
; A script to translate an Atari 2600 game.
;
; $VER: "Install Atari 2600 Game" 2.2 (12.10.99)
; Set constants
(set #kick-too-low-msg "Kickstart 3.0 or greater is required.")
(set #askdir-prompt "In which drawer should %s be installed?")
(set #ask-name-prompt
"Please select the source drawer of the Atari 2600 game you want to translate:"
)
(set #ask-name-help @askstring-help)
(set #translating-msg "Translating game...")
(set #disassembly-error-msg
"An error occurred during the disassembly phase."
)
(set #assembly-error-msg
"An error occurred during the assembly phase."
)
(set #exit-msg
(cat "Installation complete!\n\n"
"%s can be found in \"%s\"."
)
)
; Check Kickstart version
(if (< (/ (getversion) 65536) 39)
(abort #kick-too-low-msg)
)
; Ask for the name of the game
(set #app-name (askdir (prompt #ask-name-prompt) (help #ask-name-help)
(default "games")
))
(set @app-name (fileonly #app-name))
; Ask where to install to
(set #default-dest
(askdir
(prompt (#askdir-prompt @app-name))
(default @default-dest)
(help @askdir-help)
(disk)
)
)
(set @default-dest #default-dest)
; Translate Atari 2600 program
(working #translating-msg)
(if
(<> 0
(run
("Stack 100000\nElectrostatic \"games/%s\""
(tackon @app-name "program")
)
)
)
(abort #disassembly-error-msg)
)
; Copy assembly file to T and delete it from the current directory
(copyfiles
(source (cat @app-name ".asm"))
(dest "T:")
(nogauge)
(help @copyfiles-help)
)
(delete (cat @app-name ".asm"))
; Assemble Atari 2600 program
(if
(<> 0
(run
("GigaPhxAss QUIET \"T:%s.asm\" TO \"%s\""
@app-name
(tackon @default-dest @app-name)
)
)
)
(abort #assembly-error-msg)
)
; Copy an icon for the translated program if one doesn't already exist
(if
(not (exists (tackon @default-dest (cat @app-name ".info"))))
(copyfiles
(source "Icons/Game Icon.info")
(dest @default-dest)
(newname (cat @app-name ".info"))
(nogauge)
(help @copyfiles-help)
)
)
; Exit the script
(exit (#exit-msg @app-name @default-dest) (quiet))
; Make sure the standard welcome screen never appears
(welcome)